; PureBasic Visual Designer v3.95 build 1485 (PB4Code)


;- Window Constants
;
Enumeration
  #MAIN_WINDOW
  #PROC_WINDOW
  #CODE_EDIT_WINDOW
EndEnumeration

;- Gadget Constants
;
Enumeration
  #PROGRESSBAR
  #MAIN_BTN_OPEN_PROCS
  #MAIN_TXT_VALUE
  #MAIN_LBL_VALUE
  #MAIN_LBL_SCAN_TYPE
  #MAIN_COMBO_SCAN_TYPE
  #MAIN_LBL_VALUE_TYPE
  #MAIN_COMBO_VALUE_TYPE
  #MAIN_CHK_HEX
  #MAIN_LISTBOX_ADDRESSES
  #MAIN_BTN_ADD_ADDR
  #MAIN_LISTBOX_CODELIST
  #MAIN_NEXTSCN
  #MAIN_BTN_FIRSTSCN
  #MAIN_FRM_SCN
  #MAIN_UNDOSCN
  #PROC_BTN_SELECT
  #PROC_BTN_CANCEL
  #PROC_LIST_PROCS
  #EDIT_BTN_SAVE
  #EDIT_BTN_CANCEL
  #EDIT_TXT_ADDRESS
  #EDIT_LBL_ADDRESS
  #EDIT_TXT_VALUE
  #EDIT_LBL_VALUE
  #EDIT_LBL_DESC
  #EDIT_TXT_DESC
  #MAIN_LBL_FOUND
  #EDIT_CHK_FREEZE
  #MAIN_CHK_UNICODE
  #MAIN_CHK_CASE
  #MAIN_BTN_COPYALL
  #MAIN_BTN_VIEWMEM
  #BTN_REMOVEALL
  #EDIT_COMBO_VALUE_TYPE
  #EDIT_LBL_VALUE_TYPE
EndEnumeration


Procedure Open_MAIN_WINDOW()
  If OpenWindow(#MAIN_WINDOW , 873, 256, 530, 523, "PB Mem Scanner",  #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_WindowCentered )
    If designerFix=designerFix;  #MAIN_WINDOW ))
      ProgressBarGadget(#PROGRESSBAR, 130, 10, 395, 20, 0, 10)
      ButtonGadget(#MAIN_BTN_OPEN_PROCS, 5, 5, 120, 30, "Open/Change Proc(s)", #PB_Button_Default)
      StringGadget(#MAIN_TXT_VALUE, 285, 105, 235, 20, "")
      TextGadget(#MAIN_LBL_VALUE, 285, 90, 40, 15, "Value:")
      TextGadget(#MAIN_LBL_SCAN_TYPE, 220, 130, 60, 15, "Scan Type:")
      ComboBoxGadget(#MAIN_COMBO_SCAN_TYPE, 285, 130, 135, 20)
      TextGadget(#MAIN_LBL_VALUE_TYPE, 220, 155, 65, 15, "Value Type:")
      ComboBoxGadget(#MAIN_COMBO_VALUE_TYPE, 285, 155, 135, 20)
      CheckBoxGadget(#MAIN_CHK_HEX, 230, 105, 45, 20, "Hex")
      
      ;- Address List
      ListIconGadget(#MAIN_LISTBOX_ADDRESSES, 5, 50, 205, 270, "Address", 100, #PB_ListIcon_MultiSelect | #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_HeaderDragDrop)
      AddGadgetColumn(#MAIN_LISTBOX_ADDRESSES, 1, "Value", 100)
      ButtonGadget(#MAIN_BTN_ADD_ADDR, 145, 323, 120, 20, "Add Address Manually")
      
      ;- Code List
      ListIconGadget(#MAIN_LISTBOX_CODELIST, 0, 345, 530, 180, "Description", 145, #PB_ListIcon_MultiSelect | #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_HeaderDragDrop)
      AddGadgetColumn(#MAIN_LISTBOX_CODELIST, 2, "Address", 100)
      AddGadgetColumn(#MAIN_LISTBOX_CODELIST, 3, "Type", 100)
      AddGadgetColumn(#MAIN_LISTBOX_CODELIST, 4, "Value", 100)
      AddGadgetColumn(#MAIN_LISTBOX_CODELIST, 4, "Status", 75)
      ButtonGadget(#MAIN_NEXTSCN, 310, 50, 75, 25, "Next Scan")
      ButtonGadget(#MAIN_BTN_FIRSTSCN, 230, 50, 75, 25, "First Scan")
      Frame3DGadget(#MAIN_FRM_SCN, 220, 35, 255, 50, "Scan Options")
      ButtonGadget(#MAIN_UNDOSCN, 390, 50, 75, 25, "Undo Scan")
      TextGadget(#MAIN_LBL_FOUND, 10, 35, 105, 15, "Found: 0")
      CheckBoxGadget(#MAIN_CHK_UNICODE, 430, 130, 90, 15, "Unicode")
      CheckBoxGadget(#MAIN_CHK_CASE, 430, 145, 85, 15, "Case Sensitve")
      ButtonGadget(#MAIN_BTN_COPYALL, 95, 323, 25, 20, "C")
      GadgetToolTip(#MAIN_BTN_COPYALL, "Copy all addresses to code list.")
      ButtonGadget(#MAIN_BTN_VIEWMEM, 5, 323, 90, 20, "View Memory")
      ButtonGadget(#BTN_REMOVEALL, 120, 323, 25, 20, "D")
      GadgetToolTip(#BTN_REMOVEALL, "Delete all from code list.")
      
    EndIf
  EndIf
EndProcedure

Procedure Open_PROC_WINDOW()
  If OpenWindow(#PROC_WINDOW , 1473, 491, 289, 278, "PB Mem Scanner - [Choose Process]",  #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_WindowCentered )
    If designerFix=designerFix;  #PROC_WINDOW ))
      ButtonGadget(#PROC_BTN_SELECT, 130, 240, 75, 30, "&Select", #PB_Button_Default)
      ButtonGadget(#PROC_BTN_CANCEL, 205, 240, 75, 30, "&Cancel")
      ListViewGadget(#PROC_LIST_PROCS, 5, 5, 275, 230)
      
    EndIf
  EndIf
EndProcedure

Procedure Open_CODE_EDIT_WINDOW()
  If OpenWindow(#CODE_EDIT_WINDOW, 258, 185, 258, 153, "PB Mem Scanner - [Code Edit]",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_WindowCentered )
    If designerFix=designerFix;  #CODE_EDIT_WINDOW))
      ButtonGadget(#EDIT_BTN_SAVE, 120, 115, 65, 25, "&Save", #PB_Button_Default)
      ButtonGadget(#EDIT_BTN_CANCEL, 185, 115, 65, 25, "&Cancel")
      StringGadget(#EDIT_TXT_ADDRESS, 75, 10, 110, 20, "")
      TextGadget(#EDIT_LBL_ADDRESS, 10, 10, 65, 20, "Address:")
      StringGadget(#EDIT_TXT_VALUE, 75, 35, 110, 20, "")
      TextGadget(#EDIT_LBL_VALUE, 10, 35, 45, 20, "Value:")
      TextGadget(#EDIT_LBL_DESC, 10, 85, 65, 20, "Description:")
      StringGadget(#EDIT_TXT_DESC, 75, 85, 175, 20, "")
      CheckBoxGadget(#EDIT_CHK_FREEZE, 190, 35, 60, 15, "Freeze")
      ComboBoxGadget(#EDIT_COMBO_VALUE_TYPE, 75, 60, 135, 20)
      TextGadget(#EDIT_LBL_VALUE_TYPE, 10, 60, 60, 20, "Value Type:")
      
    EndIf
  EndIf
EndProcedure


; IDE Options = PureBasic 4.51 (Windows - x86)
; CursorPosition = 120
; FirstLine = 83
; Folding = -
; EnableThread
; EnableXP
; DisableDebugger